package com.sunfield.windpower.bean;

import android.app.Activity;
import android.content.Context;

/**
 * 引导页按钮信息
 * Created by wxl on 2017/2/6.
 */

public class GuideInfo {

    public static final int TYPE_ACTIVITY = 1;
    public static final int TYPE_URL = 2;
    public static final int TYPE_EXIT = 3;

    String id;
    String icon;
    String name;
    String type;
    Class<? extends Activity> activityClass;
    String url;

    public int getIconRes(Context context) {
        int iconRes = 0;
        try {
            iconRes = context.getResources().getIdentifier("navigation_btn" + icon, "drawable", context.getPackageName());
        }catch (Exception e){
        }
        return iconRes;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Class<? extends Activity> getActivityClass() {
        return activityClass;
    }

    public void setActivityClass(Class<? extends Activity> activityClass) {
        this.activityClass = activityClass;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
